package com.tq.spring;

import lombok.EqualsAndHashCode;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.PathMatcher;

import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

/**
 * @author TqCoder
 * @since 2.0.0
 */
public class PathMatcherLearn {

    // FileSystemXmlApplicationContext、ClassPathXmlApplicationContext、
    // AnnotationConfigApplicationContext

    // 类加载器
    // BootstrapClassLoader -> ExtensionClassLoader -> AppClassLoader

    public record CustomResource(String path, String name) {
    }

    static List<CustomResource> page() {
        return List.of(
                new CustomResource("/api/v1/users", "用户"),
                new CustomResource("/api/v1/users/{id}", "用户"),
                new CustomResource("/api/v1/users/{id}/roles", "用户角色"),
                new CustomResource("/api/v1/users/{id}/roles/{roleId}", "用户角色")
        );
    }

    public static void main(String[] args) {
        String input = "/api/**";
        PathMatcher pathMatcher = new AntPathMatcher();



    }


    // -----------------------------------------------------------------------------------------------------------------
    // FileSystemXmlApplicationContext
    // AntPathMatcher


}
